<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\modules\Product\models\Product;

$sort = [0=>'时间由近到远',1=>'时间由远到近'];


?>
<style type="text/css">
    .form-group{margin-bottom: 10px !important;}
</style>
<div class="finance-search" style="padding:0 0 15px 0;">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'layout' => 'inline',
    ]); ?>

    <!-- ?= $form->field($model, 'id') ? -->
    <?= $form->field($model, 'code')->textInput(['placeholder'=>'单号', 'style'=>'width:150px;' ]) ?>

    <?= $form->field($model, 'type')->dropdownList(Yii::$app->params['finance_type'], ['prompt'=>Yii::t('app', 'Type')]) ?>

    <?= $form->field($model, 'price_type')->dropdownList(Yii::$app->params['finance_price_type'], ['prompt'=>Yii::t('app.finance', 'Price Type')]) ?>

    <?php echo $form->field($model, 'product_code')->textInput(['placeholder'=>'团期', 'style'=>'width:130px;']) ?>

    <?php echo $form->field($model, 'company')->textInput(['placeholder'=>'付款单位', 'style'=>'width:130px;']) ?>

    <?php echo $form->field($model, 'min_price')->textInput(['placeholder'=>'最小金额', 'style'=>'width:130px;']) ?>

    <?php echo $form->field($model, 'max_price')->textInput(['placeholder'=>'最大金额', 'style'=>'width:130px;']) ?>
    <!-- ?= $form->field($model, 'product_id')->dropdownList($product, ['prompt'=>'团期']) ? -->

    <?= $form->field($model, 'order_code')->textInput(['placeholder'=>'订单编号', 'style'=>'width:130px;']) ?>

    <?= $form->field($model, 'name')->textInput(['placeholder'=>Yii::t('app.finance', 'Name'), 'style'=>'width:100px;' ]) ?>

    <!-- ?= $form->field($model, 'total_price')->textInput(['placeholder'=>'金额', 'style'=>'width:100px;' ]) ? -->

    <?php echo $form->field($model, 'status')->dropdownList(Yii::$app->params['finance_status'], ['prompt'=>Yii::t('app', 'Status')]) ?>


    <?php echo $form->field($model, 'sort')->dropdownList($sort) ?>

	<!-- ?php $equ = ['1'=>'发票小于实际金额', 2=>'发票大于实际金额']; ? -->
    <!-- ?php echo $form->field($model, 'equ')->dropdownList($equ, ['prompt'=>'金额筛选']) ? -->

    <!-- ?= $form->field($model, 'company') ? -->
    <!-- ?= $form->field($model, 'account') ? -->
    <!-- ?php // echo $form->field($model, 'name') ? -->
    <!-- ?php // echo $form->field($model, 'desc') ? -->
    <!-- ?php // echo $form->field($model, 'img') ? -->

    <?php // echo $form->field($model, 'user_id') ?>

    <?php // echo $form->field($model, 'created_at') ?>

    <?php // echo $form->field($model, 'updated_at') ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
        <!-- ?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ? -->
    </div>

    <?php ActiveForm::end(); ?>

</div>
